package itheima_1;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class ClienDemo2 {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds=new DatagramSocket();
        String s="我是你爸爸 哈哈懵逼了吧";

        byte[]bytes=s.getBytes();
        InetAddress address = InetAddress.getByName("255.255.255.255");
        int port=10000;
        DatagramPacket dp=new DatagramPacket(bytes, bytes.length,address,port);

        ds.send(dp);
        ds.close();
    }
}